﻿Imports DAO
Imports DTO

Public Class NhanVienBUS
    Public Shared Function LAYTHEIID(ByVal id As Integer) As NhanVienDTO
        Dim nvDAO As New NhanVienDAO()
        Return nvDAO.LayTheoID(id)
    End Function


    Public Shared Function LAYTATCA() As IList
        Dim nvDAO As New NhanVienDAO()
        Return nvDAO.LayTatCa()
    End Function


    Public Shared Function LAYTATCATT() As DataTable
        Dim nvDAO As New NhanVienDAO()
        Return nvDAO.LayTatCaTT()
    End Function

    Public Shared Sub THEM(ByVal NhanVien As NhanVienDTO)
        Dim nvDAO As New NhanVienDAO()
        nvDAO.Them(NhanVien)
    End Sub

    Public Shared Sub CAPNHAP(ByVal NhanVien As NhanVienDTO)
        Dim nvDAO As New NhanVienDAO()
        nvDAO.CapNhap(NhanVien)
    End Sub


    Public Shared Sub XOA(ByVal id As Integer)
        Dim nvDAO As New NhanVienDAO()
        nvDAO.Xoa(id)
    End Sub

    Function Loadnv() As DataTable
        Dim dt As New DataTable()
        Dim nvdao As New NhanVienDAO()
        dt = nvdao.loadnv()
        Return dt
    End Function

End Class
